package meng.study.redis.jedis;

import java.util.List;

import redis.clients.jedis.Jedis;

/**
 * 消息发布方
 * 
 * @author mengzhang6
 *
 */
public class JedisPub {

	public static void main(String[] args) {
		Jedis jedis = JedisDemo.getJedisInsitution();
		jedis.publish("6379", "hello world");
		jedis.publish("3307", "hello mysql");

		List<String> pubsubChannels = jedis.pubsubChannels("*");
		System.out.println(pubsubChannels);

	}

}
